
                       Diamond Systems Corporation
                      Universal Driver Version 5.9

About This Package
------------------

This package contains the base driver software needed to develop for Diamond
Systems PC104 boards on VxWorks on x86.  Documentation and example source code is
available at http://www.diamondsystems.com/.

The online manual for DSCUD is at http://docs.diamondsystems.com/dscud/
See the VxWorks section of this manual for help with installation.


Supported VxWorks Versions
--------------------------

VxWorks 5.5 and Tornado 2.2 for Windows were used for development and testing of this driver. Support for other versions of VxWorks and Tornado may be available on request. Contact support@diamondsystems.com in inquire.


Installing the Driver on your Development System
------------------------------------------------

The driver is available as a zip file. To install the driver in this format you just unzip it to the directory of your choice using a program such as WinZip. If you want to use the Diamond Systems DAQ demo programs which include Tornado project files for easy compilation, install the driver at C:\DSCUD\ since this is the include path used in these project files. The instructions below assume that C:\DSCUD\ is the location of the driver files.

The driver consists of a header file dscud.h which you include in your C program, and a Tornado compiled static C library libdscud5.a which you link with your program. See the instructions below for more information on these steps.


Compiling With the Driver
-------------------------

These instructions go step by step through the process of creating your own VxWorks application which links with DSCUD for VxWorks using Tornado 2.2 for Windows.


Compiling With the Driver
-------------------------

These instructions go step by step through the process of creating your own VxWorks application which links with DSCUD for VxWorks using Tornado 2.2 for Windows.

Step 1: Create Your Project

   1. Launch the Tornado tools on your development PC.
   2. In the File menu select New Project.
   3. In the window that appears, select the New tab and then double click Create downloadable application modules for VxWorks. This will launch a wizard for creating your application.
   4. On the first stage of the wizard, chose whatever settings you'd like for the Name, Location, and Workspace. Click Next.
   5. On the second stage of the wizard, choose a project or toolchain for compiling your application and click Next.
   6. The last stage lets you review your settings. Click Finish to create your project. 

Step 2: Import Your Code

   1. The Workspace window appears after you create your project. Click the Files tab at the bottom of this window. Right click in the Workspace window and select Add Files. Select the .c and .h files that compose your program.
   2. You must be sure that your program includes the DSCUD header file for example with this command. #include <dscud.h>. 

Step 3: Configure Build Options

   1. In the Workspace window click the Builds tab at the bottom of the window. Click the + to open the tree which shows your toolchain which you will configure, for example Pentium3gnu. Select properties.
   2. The Build Specification Properties window will appear. Click the Macros tab. Pull down the menu to select the PROJ_LIBS option. Type C:\DSCUD\libdscud5.a. Click Add/Set.
   3. Click the C/C++ compiler tab. Click the "Include paths button. In the new window that appears push the Add button. In the new window that appears type C:\DSCUD\. Click OK and then OK to close these two windows.
   4. Click Apply and then OK to save your changes and exit the Build Specification Properties window. 

Your application is now ready to be built. See the VxWorks Tornado documentation for additional help with this development environment.


Important Notes on DSCUD for VxWorks
------------------------------------

These notes apply only to the VxWorks version of DSCUD.

   1. The driver is not thread safe. If you have multiple threads or programs interacting with the same board at the same time using DSCUD you must implement your own synchronization methods.
   2. User interrupt functions are called directly from the interrupt service routine. This is a restrictive environment. See the VxWorks documentation for more information on features which are not available in an interrupt context.
   3. Interrupt sharing support is not implemented in DSCUD for VxWorks. Each DAQ board must be assigned a unique IRQ for interrupt driven DAQ operations. Support for this feature may appear in future versions of the software. 


Getting Additional Help
-----------------------

Please review the online documentation for the driver, especially
the Linux installation section, before contacting support, as many
of the most frequently asked questions are answered there.

The Diamond Systems website at http://www.diamondsystems.com/

Call toll-free 800-367-2104.

Outside North America call 510-456-7800.


